package com.cpr.demo.model.mq;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * @author Chen Panrui
 * created at 2021/10/18 17:03
 */
@Getter
@Setter
@TableName("demo_single_mq_report")
public class SingleMqReport {

    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 一个消息，一个id
     */
    @TableField("message_id")
    private String messageId;
    /**
     * message消费状态,0=已发送未接收,1=已发送已接受
     */
    @TableField
    private String status;
    @TableField("queue_name")
    private String queueName;
    /**
     * 处理消息类型,1=我的single队列, 2=rabbitMQ
     */
    @TableField("handle_type")
    private String handleType;

    /**
     * 发送的消息，原始的消息数据
     */
    @TableField("publish_message")
    private String publishMessage;
    @TableField("publish_time")
    private Date publishTime;
    /**
     * 发送message的节点
     */
    @TableField("publish_node")
    private String publishNode;

    /**
     * 接收的消息，原始的消息数据
     */
    @TableField("receive_message")
    private String receiveMessage;
    @TableField("receive_time")
    private Date receiveTime;
    /**
     * 消费message的节点
     */
    @TableField("receive_node")
    private String receiveNode;

    /**
     * 其他扩展字段
     */
    @TableField
    private String extend;

}
